const path = require('path');
const xlsx = require('node-xlsx');
const PATH = path.join(path.dirname(__filename), './数据样例.xlsx');
const data = {};
xlsx.parse(PATH)
.slice(1)
.forEach(item => {
  const result = []
  const header = item['data'][0];
  item['data'].slice(1).forEach(ii => {
    const res = {}
    header.forEach((h, index) => {
      res[h] = ii[index];
    })
    result.push(res)
  })
  data[item['name']] = result;
})
// console.log(data)
module.exports = data;
